import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes:Array<RouteRecordRaw> = [
    {
        path: '/index',
        name: 'index',
        component:() => import('../components/index.vue')
    },
    {
        path: '/',
        name: 'login',
        component:() => import('../components/login.vue')
    },
    {
        path: '/:pathMatch(.*)*', redirect:'/'
    }
]
const router = createRouter({
    history:createWebHistory(),
    routes
})

export default router